<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <base href="<?php echo base_url(); ?>"/>
    <title><?php echo $title; ?></title>
    <link href="style/base.css" rel="stylesheet" type="text/css" />
    <link href="style/common.css" rel="stylesheet" type="text/css" />
    <link href="style/star.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <!--[if IE 6]>
    <script type="text/javascript" language="javascript" src="js/ie6/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript" language="javascript">
        DD_belatedPNG.fix('.star_top_logo img,.footer_logo img,.star_top_txt img');
    </script>
    <![endif]-->
</head>
<body>
<!-- head S-->
<?php
include 'header.php';
?>
<!-- head E-->

<!-- 顶部 S -->
<?php
include 'star_man.php';
?>
<!-- 顶部 E -->

<!-- 每日之星选项卡 S -->
<?php
include 'star_nav.php';
?>
<!-- 每日之星选项卡 E -->

<!-- 活动文章内页 S -->
<div class="star_page clearfix">
    <!--main S-->
    <div class="star_page_main">
        <!--浮动分享-->
        <div class="floatshare">
            <!-- JiaThis Button BEGIN -->
            <div class="jiathis_share_slide jiathis_share_32x32" id="jiathis_share_slide" style="margin-left: -60px;">
                <div class="jiathis_share_slide_top" id="jiathis_share_title"></div>
                <div class="jiathis_share_slide_inner">
                    <div class="jiathis_style_32x32">
                        <a class="jiathis_button_qzone"></a>
                        <a class="jiathis_button_tsina"></a>
                        <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
                        <script type="text/javascript">
                            var jiathis_config = {data_track_clickback:'true'
                                ,slide:{
                                    divid:'jiathis_main',
                                    pos:'left'
                                }
                            };
                        </script>
                        <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1365343082402503" charset="utf-8"></script>
                        <script type="text/javascript" src="http://v3.jiathis.com/code/jiathis_slide.js" charset="utf-8"></script>
                    </div></div></div>
            <!-- JiaThis Button END -->
        </div>
        <!--文章内容 S-->
        <div class="star_page_article">
            <h3 class="spa_tit"><?php echo $star['title'];?></h3>
            <div class="spa_msg">
                <span class="spa_date"><?php echo date('Y年m月d日',$star['create_time']);?>   星探麻豆</span>
                <!--<div class="spa_share">
                    <img src="images/btn_share_qq.png" /> <img src="images/btn_share_weibo.png" /> 手机用户…等1人分享过
                </div>-->
            </div>
            <div class="spa_body">
               <?php echo $star['content'];?>
                <div class="spa_vote">
                    <h4><?php if(isset($user['realname'])) echo $user['realname'];?><span>为我投票吧</span></h4>
                    <a href="javascript:;" class="btn_vote" onclick="vote(<?php if(isset($_GET['uid'])) echo $_GET['uid']; else echo $this->session->userdata ['id'];?>,<?php if(isset($_GET['id'])) echo $_GET['id']; else echo $this->session->userdata ['id'];?>,this)"><span><?php echo $user['voteCount']?>票</span></a>
                </div>
            </div>

            <div class="spa_msg2">
                <div class="spa_zan">
                    <!-- JiaThis Button BEGIN -->
                    <div class="jiathis_style">
                        <a class="jiathis_like_tsinat" data="width=320"></a>
                    </div>
                    <script type="text/javascript">
                        var jiathis_config = {data_track_clickback:'true'};
                    </script>
                    <script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js?uid=1365343082402503" charset="utf-8"></script>
                    <!-- JiaThis Button END -->
                </div>
                <div class="spa_share2">
                    <!-- JiaThis Button BEGIN -->
                    <div class="jiathis_style_24x24">
                        <a class="jiathis_button_qzone"></a>
                        <a class="jiathis_button_tsina"></a>
                        <a class="jiathis_button_tqq"></a>
                        <a class="jiathis_button_weixin"></a>
                        <a class="jiathis_button_renren"></a>
                        <a href="http://www.jiathis.com/share?uid=1928977" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
                        <a class="jiathis_counter_style"></a>
                    </div>
                    <script type="text/javascript">
                        var jiathis_config = {data_track_clickback:'true'};
                    </script>
                    <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1365343082402503" charset="utf-8"></script>
                    <!-- JiaThis Button END -->
                </div>
            </div>
        </div>
        <!--文章内容 E-->

        <!--评论 S-->
        <div class="star_page_comment">
            <p>此处用的是友言的评论代码，在本地打开是不显示的，放到服务器，用域名访问就会显示了</p>
            <!-- UY BEGIN -->
            <div id="uyan_frame"></div>
            <script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js"></script>
            <!-- UY END -->

        </div>
        <!--评论 E-->
    </div>
    <!--main E-->

    <!--sidebar S-->
    <div class="star_page_side">
        <ul>
            <?php foreach($star_list['data'] as $item):?>
            <li>
                <div class="img_block">
                    <a href="index.php/interview/star_content?id=<?php echo $item['id'];?>&uid=<?php echo $item['uid'];?>" target="_blank"><img alt="" src="<?php if(isset($item['url'])) echo 'uploads/'.$item['url'];?>" /></a>
                    <a href="index.php/interview/star_content?id=<?php echo $item['id'];?>&uid=<?php echo $item['uid'];?>" class="tit" target="_blank"><span><?php echo $item['title'];?></span></a>
                </div>
                <h3><a href="index.php/interview/star_content?id=<?php echo $item['id'];?>&uid=<?php echo $item['uid'];?>" class="tit" target="_blank"><?php echo $item['title'];?></a></h3>
            </li>
            <?php endforeach;?>
        </ul>
    </div>
    <!--sidebar E-->
</div>
<!-- 活动文章内页 E -->


<!-- 底部 S -->
<?php include 'footer.php'; ?>
<!-- 底部 E -->
<script>
    function vote(id,interview,obj)
    {
        if(!id || !interview){
            alert('参数错误');
            return ;
        }

        var params = {id:id,interview:interview};
        $.ajax({
            type:"post",
            url:"index.php/login/ajaxVote",
            dataType:"json",
            data:params,
            success:function(data){
                var html = '';
                if(data.statusCode!=1){
                    alert(data.msg);
                }else{
                    html = $(obj).children('span').html();
                    if(html){
                        $(obj).children('span').html(parseInt(html)+1);
                    }

                    alert(data.msg);
                }
            }
        });
    }
</script>
</body>
</html>
